<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Cross Request</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      width: 400px;
      min-height: 200px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      font-size: 14px;
      line-height: 1.5;
      color: #333;
      background: #fff;
    }

    .main {
      padding: 20px;
    }

    .header {
      text-align: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 1px solid #e0e0e0;
    }

    .header h1 {
      font-size: 20px;
      font-weight: 600;
      color: #2c3e50;
      margin-bottom: 4px;
    }

    .header p {
      font-size: 13px;
      color: #6c757d;
    }

    .content {
      margin-bottom: 20px;
    }

    .section {
      margin-bottom: 20px;
    }

    .section-title {
      font-size: 16px;
      font-weight: 600;
      color: #2c3e50;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid #f0f0f0;
    }

    .info-box {
      background: #f8f9fa;
      border: 1px solid #e9ecef;
      border-radius: 6px;
      padding: 16px;
      margin-bottom: 16px;
    }

    .info-box h4 {
      font-size: 14px;
      font-weight: 600;
      color: #495057;
      margin-bottom: 8px;
    }

    .info-box p {
      font-size: 13px;
      color: #6c757d;
      line-height: 1.4;
    }

    .status {
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 13px;
      margin-top: 12px;
      display: none;
    }

    .status.success {
      background: #d4edda;
      color: #155724;
      display: block;
    }

    .status.error {
      background: #f8d7da;
      color: #721c24;
      display: block;
    }

    .status.info {
      background: #d1ecf1;
      color: #0c5460;
      display: block;
    }

    .footer {
      text-align: center;
      padding-top: 15px;
      border-top: 1px solid #e0e0e0;
    }

    .footer a {
      color: #007bff;
      text-decoration: none;
      font-size: 13px;
    }

    .footer a:hover {
      text-decoration: underline;
    }

    .setting-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid #f0f0f0;
    }

    .setting-item:last-child {
      border-bottom: none;
    }

    .setting-label {
      font-size: 14px;
      color: #333;
    }

    .setting-desc {
      font-size: 12px;
      color: #6c757d;
      margin-top: 2px;
    }

    .btn {
      padding: 6px 12px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 500;
      transition: background-color 0.2s;
    }

    .btn-primary {
      background: #007bff;
      color: white;
    }

    .btn-primary:hover {
      background: #0056b3;
    }

    .btn-success {
      background: #28a745;
      color: white;
    }

    .btn-success:hover {
      background: #218838;
    }

    .btn:disabled {
      background: #6c757d;
      cursor: not-allowed;
      opacity: 0.6;
    }
  </style>
</head>

<body>
  <div class="main">
    <div class="header">
      <h1>Cross Request</h1>
      <p>跨域请求助手</p>
    </div>

    <div class="content">
      <div class="section">
        <h3 class="section-title">扩展状态</h3>
        <div class="info-box">
          <h4>功能简介</h4>
          <p>扩展已启用，支持跨域请求并在页面上实时显示 cURL 命令。发送请求后，请查看页面右上角的弹窗。</p>
        </div>
      </div>

      <div class="section">
        <h3 class="section-title">cURL 弹窗设置</h3>
        <div class="setting-item">
          <div>
            <div class="setting-label">cURL 命令弹窗</div>
            <div class="setting-desc">控制页面上 cURL 命令弹窗的显示</div>
          </div>
          <button id="enable-curl-btn" class="btn btn-success">启用弹窗</button>
        </div>
      </div>
      
      <div class="status" id="status"></div>
    </div>

    <div class="footer">
      <a href="https://github.com/leeguooooo/cross-request-master" target="_blank">查看帮助文档</a>
    </div>
  </div>

  <script src="popup.js"></script>
</body>

</html>